package com.runshu.newsmartark.mvp.contract;




import com.runshu.newsmartark.network.netbean.ResponseBean;
import com.runshu.newsmartark.network.netinterface.BaseCallBack;

import java.util.Map;

/**
 * <pre>
 *     Created by yyd
 *     desc   : BaseContract基类
 *     version: 1.0   初始化
 *     params:
 *  <pre>
 */

public interface BaseContract {
    interface BaseModel {
        void initDataFromServer(String url, Map<String, Object> params, Class clz, int beanType, BaseCallBack baseCallBack);
        void initDataFromServerGet(String url, Map<String, String> params, Class clz, int beanType, BaseCallBack baseCallBack);


    }

    interface BaseView {
        void onSuccess(ResponseBean responseBean);

        void onFailure(ResponseBean responseBean);

        void onLoading();
    }

    interface BasePresenter {
        /**
         * @param url      请求地址
         * @param params   请求参数
         * @param clz      返回实体类类型
         * @param beanType 返回类型 RES_DATATYPE_BEAN是实体类   RES_DATATYPE_BEANLIST实体类集合
         */
        void initDataFromServer(String url, Map<String, Object> params, Class clz, int beanType);

        void initDataFromServerGet(String url, Map<String, String> params, Class clz, int beanType);
    }
}
